<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
global $data, $admin;

/**
 * Description of empresas
 *
 * @author Golem
 */
class Empleados extends CI_Controller {

    public function __construct() {
        parent::__construct();
        global $admin, $data;
        # cargamos variables
        $admin = $this->session->userdata('admin');
        $admin['place'] = 'empleados';
        # verifica si pasó por sushitto
        if ($admin['ta_tipo_administrador_id'] != 1) {
            redirect('home');
        }
        $this->output->enable_profiler(FALSE);
    }

    public function index() {
        global $data, $admin;
        $data['empleado'] = $this->cc_model_a->lista_empleados();
        $this->load->view('template/header', $admin);
        $this->load->view('template/open_content_container');
        $this->load->view('menu/menu_admin', $data);
        $this->load->view('empleados/content');
        $this->load->view('template/close_content_container');
        $this->load->view('template/footer');
    }

}
